package com.tuniondata.netty.bean;

import com.tuniondata.netty.common.Pack;
import com.tuniondata.netty.common.Unpack;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 文件数通知报文（4006）
 * 请求
 *
 * @author yuxinchao
 */
@ApiBinaryDTO(mtp = "4006")
public class DataNotifyRequestDTO implements ApiBinaryBean {

    /**
     * 文件数
     */
    @ApiModelProperty(value = "文件数", required = true)
    @NotNull
    private Integer fileCount;

    public Integer getFileCount() {
        return fileCount;
    }

    public void setFileCount(Integer fileCount) {
        this.fileCount = fileCount;
    }

    @Override
    public byte[] pack() throws Exception {
        Pack pack = Pack.alloc();
        pack.addInteger(fileCount, 4);
        return pack.pack();
    }

    @Override
    public void unpack(byte[] data) throws Exception {
    }
}
